
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.codec.binary.Hex;
import org.hibernate.util.xml.XmlDocument;
import org.w3c.dom.Document;

import com.bodystm.temperature.server.ByteUtil;
import com.bodystm.temperature.server.Temperature;
import com.bodystm.temperature.web.DeviceSettings;
import com.bodystm.temperature.web.TemperatureDevice;
import oracle.net.aso.n;
import java.io.FileInputStream; 
import java.io.FileNotFoundException; 
import java.io.FileOutputStream; 
import java.io.IOException; 
import java.io.InputStream; 
import java.io.PrintWriter; 
import javax.xml.parsers.DocumentBuilder; 
import javax.xml.parsers.DocumentBuilderFactory; 
import javax.xml.parsers.ParserConfigurationException; 
public class test {

	public static void main(String[] args) throws ParserConfigurationException {
		
		try {
			//byte a=new Byte("0x55");
			//byte b=new Byte("55");
			byte c= 0x7E;
			byte b=(byte) Integer.parseInt("7E", 16);
			System.out.println("0x55".getBytes()[0]);
			System.out.println("55".getBytes()[0]);
			System.out.println(c);
			System.out.println(b);
			System.out.println("ABACAD".getBytes()[0]);System.out.println("ABACAD".getBytes()[1]);System.out.println("ABACAD".getBytes()[2]);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		// TODO Auto-generated method stub
//		TemperatureDevice tt=new TemperatureDevice();
//		System.out.print(1==2&&1==1||1==1&&1==1);
//		List<String> lst=new ArrayList<String>();
//		lst.add("1");
//		lst.add("2");
//		lst.add("3");
//		lst.add("4");
//		lst.add("5");
//		for(int i=0;i<lst.size();i++){
//			lst.remove(i--);
//		}
//		List<Temperature> temperatures=null;
//		//temperatures.add(new Temperature());
//		int i=0;
//		Date time1=new Date();
//		while(i<1000){
//			System.out.print("123");
//			i++;
//		}
//		Date time2=new Date();
//		long sss=(time2.getTime()-time1.getTime());
//		System.out.print(time2.getTime()+" "+time1.getTime());
//		List<float[]> ss=new ArrayList<float[]>();
//		float[] ff=new float[6];
//		ss.add(ff);
//		ff[1]=33f;
//		System.out.print(ss.get(0)[1]);
//		byte bbb=(byte) 0xAA;
//		String sss=ByteUtil.convertByteToString(bbb);
//		Integer.toHexString(bbb);	
		
		/*int MSG_SEP = 0X7E;
		String ss="AA558EE396C2B5D0010203040506010203040506010203007E";
		byte[] dataBytes=new byte[]{-86, 85, -114, -29, -106, -62, -75, -48, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 0, -1};//ss.getBytes();//new byte[{0xAA,0x55,0x8E,0xE3,0x96,0xC2,0xB5,0xD0,0x01,0x02,0x03,0x04,0x05,0x06,0x01,0x02,0x03,0x04,0x05,0x06,0x01,0x02,0x03,0x00,0x7E}];
		if(dataBytes[0]!=-86){
			int oo=10;
		}
		ss=ByteUtil.convertByteToString(dataBytes);
		byte bb=-86;
		ss=ByteUtil.convertByteToString(bb);
		ss=Integer.toHexString(-86);
		int a=0XAA;
		int b=0XFF;
		if ((dataBytes[0] != MSG_SEP&&dataBytes[0]!=a)
				|| (dataBytes[dataBytes.length - 1] != MSG_SEP&&dataBytes[dataBytes.length - 1] !=b)){
			System.out.print("不符合");
		}else{
			System.out.print("符合");
		}*/
//		DocumentBuilderFactory factory = DocumentBuilderFactory 
//				.newInstance(); 
//				DocumentBuilder builder = factory.newDocumentBuilder(); factory.
//				 Document document = builder.newDocument(); 
//				 document.
				
	}

}
